package org.origin.ferret.system.model.dto.user;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 插入系统用户数据-实体类
 *
 * @author ferret
 * @version 2024-05-08
 */
@Data
@Schema(description = "插入系统用户数据-实体类")
public class SysUserInsertDto {

    @NotBlank(message = "账户不能为空")
    @Schema(description = "账户", requiredMode = Schema.RequiredMode.REQUIRED)
    private String account;

    @NotBlank(message = "密码不能为空")
    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String password;

    @NotBlank(message = "名称不能为空")
    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @Schema(description = "头像")
    private String photo;

    @Schema(description = "手机")
    private String phone;

    @Schema(description = "性别")
    private Integer gender;

    @Schema(description = "生日")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birth;

    @Schema(description = "证件")
    private String identity;

}
